package hu.diploma.core.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "structuredname_table")
public class StructuredName extends BaseEntity {

	@Column(name = "displayName")
	private String displayName;

	@Column(name = "familName")
	private String familName;

	@Column(name = "middleName")
	private String middleName;

	@Column(name = "givenName")
	private String givenName;

	@Column(name = "preixName")
	private String preixName;

	@OneToOne(mappedBy = "structuredName", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private Person person;

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getFamilName() {
		return familName;
	}

	public void setFamilName(String familName) {
		this.familName = familName;
	}

	public String getMiddleName() {
		return middleName;
	}

	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	public String getGivenName() {
		return givenName;
	}

	public void setGivenName(String givenName) {
		this.givenName = givenName;
	}

	public String getPreixName() {
		return preixName;
	}

	public void setPreixName(String preixName) {
		this.preixName = preixName;
	}

	public Person getPerson() {
		return person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}

}
